<script type="text/html" template>
    <link rel="stylesheet" href="{{ layui.setter.base }}style/welcome.css?v={{ layui.setter.version }}" media="all"/>
</script>
<div class="child-box">
    <div class="layui-row">
        <div class="layui-col-xs12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="userInfoTop">
                        <div class="userWap">
                            <div class="userPic hd-avatar">
                                <img id="index-user-head" src="/img/default.jpg"/><span id="index-edit-head">修改头像</span>
                            </div>
                            <div class="userContent">
                                <script type="text/html" template lay-url="/scm/company/grade" id="TPL_welcome_user_content">
                                    <div lay-templateid="TPL_welcome_user_content">
                                        <div class="f14b row">
                                            欢迎您！
                                            {{# if(layui.com.isEmpty(d.data.name)){ }}
                                            <div class="show-tooltip" style="display: inline-block;font-weight: normal">
                                                <a href="javascript:" class="tcolor" zmark-event="layui.welcome.showEditCompany">未填写公司名称</a>
                                                <div class="a-tooltip" style="left: 16px;top: -30px;width: 228px;display: block;">
                                                    <div class="tooltip-content arrow-bottom-left">
                                                        <a href="javascript:;" class="close-tooltip" style="top: 7px;right: 5px" close-tooltip>×</a>
                                                        <p>
                                                            您还未完善公司信息，点击<a href="javascript:" zmark-event="layui.welcome.showEditCompany">立即完善</a>&nbsp;&nbsp;&nbsp;&nbsp;
                                                        </p>
                                                    </div>
                                                </div>
                                            </div>
                                            {{# }else{ }}
                                                {{# if(d.data.statusId == 'waitPerfect' && layui.com.isNotEmpty(d.data.auditOpinion)){ }}
                                                    <div class="show-tooltip" style="display: inline-block;font-weight: normal">
                                                        <a href="javascript:" class="color-red" zmark-event="layui.welcome.showEditCompany"><i class="iconfont iconjinggao"></i> {{d.data.name}}</a>
                                                        <div class="a-tooltip red" style="left: -25px;top: -30px;width: 256px;display: block;">
                                                            <div class="tooltip-content arrow-bottom-left">
                                                                <a href="javascript:;" class="close-tooltip" style="top: 7px;right: 5px" close-tooltip>×</a>
                                                                <p>
                                                                    您的公司信息未审核通过，点击<a href="javascript:" zmark-event="layui.welcome.showEditCompany">立即完善</a>&nbsp;&nbsp;&nbsp;&nbsp;
                                                                </p>
                                                            </div>
                                                        </div>
                                                    </div>
                                                {{# }else{ }}
                                                    <a href="javascript:" lay-href="/company/basicInfo" class="tcolor">{{d.data.name}}</a>
                                                {{# } }}
                                            {{# } }}
                                            您的入仓号为：<span class="tcolor">{{d.data.code}}</span>
                                        </div>
                                        <div class="row">
                                            上次登录时间：{{d.data.lastLoginTime}}
                                        </div>
                                        <div class="row">
                                            <span>资料完善度：</span>
                                            <div class="layui-progress">
                                                <div class="layui-progress-bar" style="width: {{d.data.perfectGrade}}%"><span class="layui-progress-text">{{d.data.perfectGrade}}%</span></div>
                                            </div>
                                            {{# if(d.data.perfectGrade < 100){ }}
                                            <a href="javascript:" lay-href="/user/setting" class="perfect-link">立即完善</a>
                                            {{# } }}
                                        </div>
                                        <div class="row">
                                            <span>账户安全级别：</span>
                                            {{# if(d.data.accountSafeLevel == '低'){ }}
                                                <div class="show-tooltip" style="display: inline-block">
                                                    <span class="color-red"><i class='iconfont iconjinggao'></i> {{d.data.accountSafeLevel}}</span>
                                                    <div class="a-tooltip" style="left: -25px;top: 28px;width: 150px;display: block">
                                                        <div class="tooltip-content arrow-top-left">
                                                            <a href="javascript:;" class="close-tooltip" close-tooltip>×</a>
                                                            <p>
                                                                您当前登录账号安全级别较低，为保障您的账户安全请<a href="javascript:" lay-href="/user/setting">立即提升</a>
                                                            </p>
                                                        </div>
                                                    </div>
                                                </div>
                                            {{# }else if(d.data.accountSafeLevel == '中'){ }}
                                                <span class="color-yellow"><i class='iconfont iconyiban'></i> {{d.data.accountSafeLevel}}</span>
                                            {{# }else if(d.data.accountSafeLevel == '高'){ }}
                                                <span class="color-green"><i class='iconfont iconanquan'></i> {{d.data.accountSafeLevel}}</span>
                                            {{# } }}
                                            <span class="ml10">
                                                <div class="security-level-ico show-tooltip">
                                                     <a href="javascript:" zmark-event="layui.welcome.showEditPhone" class="{{d.data.bindPhone?'green-a':''}}"><i class="iconfont iconshouji"></i></a>
                                                     <div class="a-tooltip">
                                                        <div class="tooltip-content arrow-top-left">
                                                            <a href="javascript:" class="def-a" zmark-event="layui.welcome.showEditPhone">修改手机</a>
                                                        </div>
                                                     </div>
                                                </div>
                                                <div class="security-level-ico show-tooltip">
                                                     <a href="javascript:" onclick="layui.welcome.showEditPwd({{d.data.setPassword}})" class="{{d.data.setPassword?'green-a':''}}"><i class="iconfont iconmima"></i></a>
                                                     <div class="a-tooltip">
                                                        <div class="tooltip-content arrow-top-left">
                                                           <a href="javascript:" onclick="layui.welcome.showEditPwd({{d.data.setPassword}})" class="def-a">{{d.data.setPassword?'修改密码':'设置密码'}}</a>
                                                        </div>
                                                     </div>
                                                </div>
                                                 <div class="security-level-ico show-tooltip">
                                                     <a href="javascript:" onclick="layui.welcome.showEditMail({{d.data.bindMail}})" class="{{d.data.bindMail?'green-a':''}}"><i class="iconfont iconyouxiang2"></i></a>
                                                     <div class="a-tooltip" style="left: -25px;top: 28px">
                                                        <div class="tooltip-content arrow-top-left">
                                                             <a href="javascript:" onclick="layui.welcome.showEditMail({{d.data.bindMail}})" class="def-a">{{d.data.bindMail?'修改邮箱':'设置邮箱'}}</a>
                                                        </div>
                                                     </div>
                                                </div>
                                                <div class="security-level-ico show-tooltip">
                                                    <a href="javascript:" onclick="layui.welcome.showBindWx({{d.data.bindWeixin}})" class="{{d.data.bindWeixin?'green-a':''}}"><i class="iconfont iconweixin"></i></a>
                                                    <div class="a-tooltip" style="left: -25px;top: 28px">
                                                       <div class="tooltip-content arrow-top-left">
                                                            <a href="javascript:" onclick="layui.welcome.showBindWx({{d.data.bindWeixin}})" class="def-a">{{d.data.bindWeixin?'换绑微信':'绑定微信'}}</a>
                                                       </div>
                                                    </div>
                                                </div>
                                                 <!--<div class="security-level-ico show-tooltip">-->
                                                     <!--<a href="javascript:"><i class="iconfont iconweixin"></i></a>-->
                                                     <!--<div class="a-tooltip" style="left: -25px;top: 28px">-->
                                                        <!--<div class="tooltip-content arrow-top-left">-->
                                                            <!--修改手机-->
                                                        <!--</div>-->
                                                     <!--</div>-->
                                                <!--</div>-->
                                            </span>
                                        </div>
                                    </div>
                                </script>
                            </div>
                        </div>
                        <div class="qrcode"><img src="/img/wechat_gzh.jpg" alt="微信公众号">
                            <p></p></div>
<!--                        <div class="qrcode"><img src="/img/wechat_xcx.jpg" alt="微信小程序">-->
<!--                            <p>微信小程序</p></div>-->
                    </div>
                    <div class="box-container">
                        <div class="box-container-content">
                            <div class="layui-row">
                                <div class="layui-col-xs3">优惠券：<span class="f14b"   id="welcome-couponNumber"></span></div>
                                <div class="layui-col-xs3">账户余额：<span class="f14b" id="welcome-balance"></span></div>
                                <div class="layui-col-xs3">逾期金额：<span class="f14b" id="welcome-totalArrearsVal"></span></div>
                                <div class="layui-col-xs3">税款额度：<span class="f14b" id="welcome-taxAmount"></span></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row mt20">
        <div class="layui-col-xs12">
            <div class="layui-card">
                <div class="layui-card-body">
                    <div class="userfn-ls">
                        <ul class="userfn-ul clearfix">
                            <li>
                                <a href="javascript:" lay-href="/order/list/statusId=waitEdit">
                                    <i class="iconfont iconB"></i>
                                    <b class="num zm-hide" id="welcome-wait-edit"></b>
                                    <span>待修改</span>
                                </a>
                                <div class="show-tooltip">
                                    <div class="a-tooltip red" id="wait-edit-tooltip" style="left: 14px;top: -114px;width: 160px;">
                                        <div class="tooltip-content arrow-bottom-left">
                                            <a href="javascript:;" class="close-tooltip" close-tooltip>×</a>
                                            <p>
                                                您有订单被退回需要修改<a href="javascript:" lay-href="/order/list/statusId=waitEdit">立即查看</a>
                                            </p>
                                        </div>
                                    </div>
                                </div>
                            </li>
                            <li>
                                <a href="javascript:" lay-href="/order/list/statusId=waitPrice">
                                    <i class="iconfont iconjiage"></i>
                                    <span>待审价</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:" lay-href="/order/list/statusId=waitInspection">
                                    <i class="iconfont iconyanhuo1"></i>
                                    <span>待验货</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:" lay-href="/order/list/statusId=waitDeclare">
                                    <i class="iconfont iconbaoguanxinxi"></i>
                                    <span>待报关</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:" lay-href="/order/list/statusId=waitClearance">
                                    <i class="iconfont iconpeisong"></i>
                                    <span>待通关</span>
                                </a>
                            </li>
                            <li>
                                <a href="javascript:" lay-href="/order/list/statusId=">
                                    <i class="iconfont iconchanpin1"></i>
                                    <span>全部订单</span>
                                </a>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row mt20">
        <div class="layui-col-xs8 pr20">
            <div class="layui-card">
                <div class="layui-card-header">今日九点半付汇汇率 <a href="javascript:" title="刷新" class="layui-card-header-left" refresh-template="TPL_welcome_china_rate"><i class="layui-icon layui-icon-refresh layui-anim" zmark-anim="layui-anim-rotate"></i></a></div>
                <div class="layui-card-body" style="height: 262px;overflow: hidden">
                    <script type="text/html" template lay-url="/system/bankChinaRate/currentBankRate" id="TPL_welcome_china_rate">
                        <div lay-templateid="TPL_welcome_china_rate">
                            {{#layui.each(d.data,function(k,v) { }}
                                <div class="cur-item {{['USD','EUR','GBP','HKD','JPY','KRW','NZD','SGD','CAD','CHF','THB','AUD'].contain(v.currencyCode)?'':'zm-hide'}}">
                                    <div class="a {{v.currencyCode}}"></div>
                                    <div class="b">
                                        <h2>{{layui.com.isNotEmpty(v.rate)?v.rate:'-'}}</h2>
                                        {{v.currencyName}}
                                    </div>
                                </div>
                            {{# }); }}
                        </div>
                    </script>
                </div>
            </div>
            <div class="layui-card mt20">
                <div class="layui-card-header">本月海关汇率 <a href="javascript:" title="刷新" class="layui-card-header-left" refresh-template="TPL_welcome_customs_rate"><i class="layui-icon layui-icon-refresh layui-anim" zmark-anim="layui-anim-rotate"></i></a></div>
                <div class="layui-card-body" style="height: 262px;overflow: hidden">
                    <script type="text/html" template lay-url="/system/customsRate/obtainByDate" lay-type="post" id="TPL_welcome_customs_rate">
                        <div lay-templateid="TPL_welcome_customs_rate">
                            {{#layui.each(d.data,function(k,v) { }}
                                <div class="cur-item {{['USD','EUR','GBP','HKD','JPY','KRW','NZD','SGD','CAD','CHF','THB','AUD'].contain(v.currencyId)?'':'zm-hide'}}">
                                    <div class="a {{v.currencyId}}"></div>
                                    <div class="b">
                                        <h2>{{layui.com.isNotEmpty(v.rate)?v.rate:'-'}}</h2>
                                        {{v.currencyName}}
                                    </div>
                                </div>
                            {{# }); }}
                        </div>
                    </script>
                </div>
            </div>
        </div>
        <div class="layui-col-xs4">
            <div class="layui-card">
                <div class="layui-card-header">常用功能</div>
                <div class="layui-card-body" style="height: 262px;overflow: hidden">
                   <div class="jiugongge">
                       <div class="layui-col-xs4">
                            <a lay-href="/order/manage">
                                <i class="iconfont iconxiadan"></i>
                                <div>快捷下单</div>
                            </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/order/list">
                               <i class="iconfont icondingdanliebiao"></i>
                               <div>订单列表</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/finance/payList">
                               <i class="iconfont iconfukuan"></i>
                               <div>我的付汇</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/finance/invoceList">
                               <i class="iconfont iconpiao1"></i>
                               <div>我的发票</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/finance/paymentList">
                               <i class="iconfont iconfu1"></i>
                               <div>我的付款</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/finance/refundList">
                               <i class="iconfont iconexchangerate"></i>
                               <div>我的退款</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/product/myProduct">
                               <i class="iconfont iconproduct"></i>
                               <div>我的产品</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/supplier/mySupplier">
                               <i class="iconfont iconsupplier"></i>
                               <div>供应商</div>
                           </a>
                       </div>
                       <div class="layui-col-xs4">
                           <a lay-href="/company/basicInfo">
                               <i class="iconfont icon-"></i>
                               <div>公司资料</div>
                           </a>
                       </div>
                   </div>
                </div>
            </div>
            <div class="layui-card mt20">
                <div class="layui-card-header">新闻公告</div>
                <div class="layui-card-body" style="height: 262px;overflow: hidden">
                    <div id="view-welcome-notice">
                        <script type="text/html" id="TPL_welcome_notice">
                            <ul>
                                {{# layui.each(d,function(i,o){ }}
                                   <li>
                                      <a href="/news-detail.html?id={{o.id}}" target="_blank" class="wel-news-item" title="{{o.title}}">
                                          {{o.title}}
                                      </a>
                                   </li>
                                {{# }); }}
                            </ul>   
                         </script>
                    </div> 
                </div>
            </div>
        </div>
    </div>
    <div class="layui-row mt20"></div>
</div>
<script>
    layui.use('welcome', layui.factory('welcome'));
</script>